﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PhysioAssist2
{
    public partial class Pacientes : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) CarregaPacientes();
        }


        private void CarregaPacientes()
        {

            WS ws = new WS();
            List<Paciente> lst = ws.ListaPacientes();

            foreach (Paciente pac in lst)
            {

                HyperLink lnk = new HyperLink();

                lnk.Text = pac.nome + "<br />" + "<br />";
                lnk.NavigateUrl = "Historico.aspx?paciente=" + pac.id;

                divPacientes.Controls.Add(lnk);

            }

        }



    }




}